package com.hc.exception;

import com.hc.bean.TlsResponseEnums;

import java.io.Serializable;

public class TlsRuntimeException extends RuntimeException implements Serializable {
    private int code;

    private String msg;

    private String message;

    public TlsRuntimeException(TlsResponseEnums enums, String message) {
        super();
        this.code = enums.getCode();
        this.msg = enums.getMsg();
        this.message = message;
    }

    public TlsRuntimeException(TlsResponseEnums enums) {
        super();
        this.code = enums.getCode();
        this.msg = enums.getMsg();
    }


    public int getCode() {
        return code;
    }


    public void setCode(int code) {
        this.code = code;
    }


    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }


    public TlsRuntimeException() {
        super();
    }

    public TlsRuntimeException(String message, Throwable cause) {
        super(message, cause);
    }

    public TlsRuntimeException(String message) {
        this.code=201;
        this.message = message;
    }

}
